$(".login").click(function () {
	var username = $("input[name='username']").val();
	var password = $("input[name='password']").val();
	$.ajax({
		url:"/loginOn",
		data:{"username":username,"password":password},
		type:"post",
		async: false,
		success:function(data) {
			if(data=="1" || data==1){
				document.forms[0].action="/rolePermission/roleListIndex";
				document.forms[0].submit();
			}else{
				alert("失败,请重试");
			}
		},
		error:function (data) {
			alert("错误");
		}
	});
});